import { createApp } from 'vue'
import i18n from './languages'
import ElementPlus from 'element-plus'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import * as Icons from '@element-plus/icons-vue'
import directives from '@/directives/index'
import 'element-plus/dist/index.css'
import '@/styles/main.less'

const app = createApp(App)
const pinia = createPinia()

// icon名称映射icon组件
for (const [key, component] of Object.entries(Icons)) {
  app.component(key, component)
}

// 获取当前环境
// console.log('env', import.meta.env)

app.use(ElementPlus).use(directives).use(router).use(i18n).use(pinia).mount('#app')
